/*
 *  AS IS License 
 * ==Naive Coders==
 */
package com.naivecoders.refex.functions;

import com.naivecoders.refex.FunctionFactory;

/**
 * Invoke( Invoke (named function NAME) arg arg arg)
 *
 * @author andrew
 */
public class ResolveFunction extends AbstractFunction {

    public ResolveFunction(FunctionFactory namespace) {
        super(namespace);
    }

    @Override
    public AbstractFunction evaluate(ListFunction x) throws InvocationException {
        return getOrigin().getNamespace().get(x.asName());
    }
}
